﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shell.DomainDot;
using Framework.Poco;

namespace Framework.Domain
{
    public class HotelHallCreator : DomainDotBase<HotelHall>
    {
        public WithOne<HotelHallNextYear> HotelHallNextYear { private get; set; }

        public WithOne<ServiceCost> ServiceCost { private get; set; }

        public WithOne<ConsumptionClass> ConsumptionClass { private get; set; }

        public void BindServiceCost(Guid serviceCostIdentity)
        {
            this.ServiceCost.Bind(serviceCostIdentity);
            this.ServiceCost.Submit();
        }

        public void BindConsumptionClass(Guid consumptionClassIdentity)
        {
            this.ConsumptionClass.Bind(consumptionClassIdentity);
            this.ConsumptionClass.Submit();
        }

        public void CreateHotelHallNextYear(HotelHallNextYear prices)
        {
            var entity = this.HotelHallNextYear.Create();
            PocoUtils.AssignProperty(prices, entity, typeof(Guid));
            this.HotelHallNextYear.Submit();
        }
    }
}
